package com.newtouch.xcd.cms.service.impl;

import com.alibaba.dubbo.config.annotation.Service;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.newtouch.xcd.cms.entity.User;
import com.newtouch.xcd.cms.mapper.UserMapper;
import com.newtouch.xcd.cms.service.UserService;
import org.springframework.stereotype.Component;

/**
 * <p>
 * 本表用来存放用户的相关基本信息 服务实现类
 * </p>
 *
 * @author dongyuefeng
 * @since 2020-05-21
 */
@Component
@Service
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements UserService {


    @Override
    public User queryByRoleId(String roleId) {

        QueryWrapper queryWrapper = new QueryWrapper();

        queryWrapper.eq("role_id",roleId);

        return this.getOne(queryWrapper);
    }
}
